package swg.utils;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class WriteFile
{

	protected String path="";
	protected String data="";
	
	public WriteFile(String path, String data)
	{
		this.path=path;
		this.data=data;
	}

	public void write()
	{
		BufferedWriter bw=null; 
		try
		{
			File file = new File(path);
			FileWriter fw = new FileWriter(file);
			bw = new BufferedWriter(fw);
			bw.append(data);
		}
		catch (IOException e)
		{
			e.printStackTrace();
		}
		finally
		{
			try
			{
				bw.flush();
				bw.close();
			}
			catch (IOException e)
			{
			}
		}
		
	}

	

		
		

}
